home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / DShowIDL / Mpeg2Data.idl < prev    next >
Encoding:
Text File  |  2002-11-14  |  9.5 KB  |  304 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation.  All rights reserved.
  4. //
  5. // Module Name:
  6. //
  7. //      Mpeg2Data.idl
  8. //
  9. // Abstract:
  10. //
  11. //      Main Mpeg2Data Library Definition, and interface definitions for
  12. //      the MPEG-2 Section and Table acquisition functionality
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15.  
  16.     // Import Files
  17. import "oaidl.idl";
  18. import "ocidl.idl";
  19. import "bdaiface.idl";
  20.  
  21.     // Specify single byte packing alignment
  22. #pragma pack(push)
  23. #pragma pack(1)
  24.  
  25.     // Forward interface declarations
  26. interface ISectionList;
  27. interface IMpeg2Stream;
  28.  
  29.     // Declare well known PID/TID values for MPEG-2 tables
  30. cpp_quote("#define MPEG_PAT_PID                0x0000")
  31. cpp_quote("#define MPEG_PAT_TID                0x00")
  32.  
  33. cpp_quote("#define MPEG_CAT_PID                0x0001")
  34. cpp_quote("#define MPEG_CAT_TID                0x01")
  35.  
  36. cpp_quote("#define MPEG_PMT_TID                0x02")
  37.  
  38. cpp_quote("#define MPEG_TSDT_PID               0x0002")
  39. cpp_quote("#define MPEG_TSDT_TID               0x03")
  40.  
  41.     // Declare well known PID/TID values for ATSC tables
  42. cpp_quote("#define ATSC_MGT_PID                0x1FFB")
  43. cpp_quote("#define ATSC_MGT_TID                0xC7")
  44.  
  45. cpp_quote("#define ATSC_VCT_PID                0x1FFB")
  46. cpp_quote("#define ATSC_VCT_TERR_TID           0xC8")
  47. cpp_quote("#define ATSC_VCT_CABL_TID           0xC9")
  48.  
  49. cpp_quote("#define ATSC_RRT_PID                0x1FFB")
  50. cpp_quote("#define ATSC_RRT_TID                0xCA")
  51.  
  52. cpp_quote("#define ATSC_EIT_TID                0xCB")
  53.  
  54. cpp_quote("#define ATSC_ETT_TID                0xCC")
  55.  
  56. cpp_quote("#define ATSC_STT_PID                0x1FFB")
  57. cpp_quote("#define ATSC_STT_TID                0xCD")
  58.  
  59. cpp_quote("#define ATSC_PIT_TID                0xD0")
  60.  
  61.     // Declare well known PID/TID values for DVB tables
  62. cpp_quote("#define DVB_NIT_PID                 0x0010")
  63. cpp_quote("#define DVB_NIT_ACTUAL_TID          0x40")
  64. cpp_quote("#define DVB_NIT_OTHER_TID           0x41")
  65.  
  66. cpp_quote("#define DVB_SDT_PID                 0x0011")
  67. cpp_quote("#define DVB_SDT_ACTUAL_TID          0x42")
  68. cpp_quote("#define DVB_SDT_OTHER_TID           0x46")
  69.  
  70. cpp_quote("#define DVB_BAT_PID                 0x0011")
  71. cpp_quote("#define DVB_BAT_TID                 0x4A")
  72.  
  73. cpp_quote("#define DVB_EIT_PID                 0x0012")
  74. cpp_quote("#define DVB_EIT_ACTUAL_TID          0x4E")
  75. cpp_quote("#define DVB_EIT_OTHER_TID           0x4F")
  76.  
  77. cpp_quote("#define DVB_RST_PID                 0x0013")
  78. cpp_quote("#define DVB_RST_TID                 0x71")
  79.  
  80. cpp_quote("#define DVB_TDT_PID                 0x0014")
  81. cpp_quote("#define DVB_TDT_TID                 0x70")
  82.  
  83. cpp_quote("#define DVB_ST_PID_16               0x0010")
  84. cpp_quote("#define DVB_ST_PID_17               0x0011")
  85. cpp_quote("#define DVB_ST_PID_18               0x0012")
  86. cpp_quote("#define DVB_ST_PID_19               0x0013")
  87. cpp_quote("#define DVB_ST_PID_20               0x0014")
  88. cpp_quote("#define DVB_ST_TID                  0x72")
  89.  
  90. cpp_quote("#define DVB_TOT_PID                 0x0014")
  91. cpp_quote("#define DVB_TOT_TID                 0x73")
  92.  
  93. cpp_quote("#define DVB_DIT_PID                 0x001E")
  94. cpp_quote("#define DVB_DIT_TID                 0x7E")
  95.  
  96. cpp_quote("#define DVB_SIT_PID                 0x001F")
  97. cpp_quote("#define DVB_SIT_TID                 0x7F")
  98.  
  99.     // Declare well known PID/TID values for ISDB tables
  100. cpp_quote("#define ISDB_DCT_PID                0x0017")
  101. cpp_quote("#define ISDB_DCT_TID                0xC0")
  102.  
  103. cpp_quote("#define ISDB_LIT_PID                0x0020")
  104. cpp_quote("#define ISDB_LIT_TID                0xD0")
  105.  
  106. cpp_quote("#define ISDB_ERT_PID                0x0021")
  107. cpp_quote("#define ISDB_ERT_TID                0xD1")
  108.  
  109. cpp_quote("#define ISDB_ITT_TID                0xD2")
  110.  
  111. cpp_quote("#define ISDB_DLT_TID                0xC1")
  112.  
  113. cpp_quote("#define ISDB_PCAT_PID               0x0022")
  114. cpp_quote("#define ISDB_PCAT_TID               0xC2")
  115.  
  116. cpp_quote("#define ISDB_SDTT_PID               0x0023")
  117. cpp_quote("#define ISDB_SDTT_TID               0xC3")
  118.  
  119.  
  120.  
  121. ////////////////////////////////////
  122. //
  123. // Mpeg2DataLib Library
  124. //
  125. ////////////////////////////////////
  126.  
  127. cpp_quote("class DECLSPEC_UUID(\"DBAF6C1B-B6A4-4898-AE65-204F0D9509A1\") Mpeg2DataLib;")
  128.  
  129. [
  130.     uuid(DBAF6C1B-B6A4-4898-AE65-204F0D9509A1),
  131.     version(1.0)
  132. ]
  133. library Mpeg2DataLib
  134. {
  135.     importlib("stdole32.tlb");
  136.     importlib("stdole2.tlb");
  137.  
  138.     // Include related interface definition files so that everything ends up
  139.     // in the same library. Note that the order in which these files are
  140.     // included is important, so do not rearrange them arbitrarily
  141. #include "Mpeg2Structs.idl"
  142. #ifdef MPEG2_FUTURE_CODE // Not available in DX9
  143. #include "Mpeg2PsiParser.idl"
  144. #include "AtscPsipParser.idl"
  145. #include "DvbSiParser.idl"
  146. #endif
  147.  
  148.  
  149.  
  150.     ////////////////////////////////////
  151.     //
  152.     // IMpeg2Data Interface
  153.     //
  154.     ////////////////////////////////////
  155.  
  156.     [
  157.         object,
  158.         uuid(9B396D40-F380-4e3c-A514-1A82BF6EBFE6),    
  159.         pointer_default(unique)
  160.     ]
  161.     interface IMpeg2Data : IUnknown
  162.     {
  163.         HRESULT GetSection([in]  PID                      pid,
  164.                            [in]  TID                      tid,
  165.                            [in]  PMPEG2_FILTER            pFilter,            // OPTIONAL
  166.                            [in]  DWORD                    dwTimeout,
  167.                            [out] ISectionList **          ppSectionList);
  168.  
  169.         HRESULT GetTable([in]  PID                        pid,
  170.                          [in]  TID                        tid,
  171.                          [in]  PMPEG2_FILTER              pFilter,            // OPTIONAL
  172.                          [in]  DWORD                      dwTimeout,
  173.                          [out] ISectionList **            ppSectionList);
  174.  
  175.         HRESULT GetStreamOfSections([in]  PID             pid,
  176.                                     [in]  TID             tid,
  177.                                     [in]  PMPEG2_FILTER   pFilter,            // OPTIONAL
  178.                                     [in]  HANDLE          hDataReadyEvent,
  179.                                     [out] IMpeg2Stream ** ppMpegStream);
  180.     };
  181.  
  182.  
  183.  
  184.     ////////////////////////////////////
  185.     //
  186.     // ISectionList Interface
  187.     //
  188.     ////////////////////////////////////
  189.  
  190.     [
  191.         object,
  192.         uuid(AFEC1EB5-2A64-46c6-BF4B-AE3CCB6AFDB0),
  193.         pointer_default(unique)
  194.     ]
  195.     interface ISectionList : IUnknown
  196.     {
  197.         HRESULT Initialize([in]  MPEG_REQUEST_TYPE requestType,
  198.                            [in]  IMpeg2Data *      pMpeg2Data,
  199.                            [in]  PMPEG_CONTEXT     pContext,
  200.                            [in]  PID               pid,
  201.                            [in]  TID               tid,
  202.                            [in]  PMPEG2_FILTER     pFilter,                   // OPTIONAL
  203.                            [in]  DWORD             timeout,
  204.                            [in]  HANDLE            hDoneEvent);               // OPTIONAL
  205.  
  206.         HRESULT InitializeWithRawSections([in]  PMPEG_PACKET_LIST pmplSections);
  207.  
  208.         HRESULT CancelPendingRequest(void);
  209.  
  210.         HRESULT GetNumberOfSections([out] WORD * pCount);
  211.  
  212.         HRESULT GetSectionData([in]  WORD          sectionNumber,
  213.                                [out] DWORD *       pdwRawPacketLength,
  214.                                [out] PSECTION *    ppSection);
  215.  
  216.         HRESULT GetProgramIdentifier(PID * pPid);
  217.  
  218.         HRESULT GetTableIdentifier(TID * pTableId);
  219.     };
  220.  
  221.  
  222.  
  223.     ////////////////////////////////////
  224.     //
  225.     // IMpeg2Stream Interface
  226.     //
  227.     ////////////////////////////////////
  228.  
  229.     [
  230.         object,
  231.         uuid(400CC286-32A0-4ce4-9041-39571125A635),
  232.         pointer_default(unique)
  233.     ]
  234.     interface IMpeg2Stream : IUnknown
  235.     {
  236.         HRESULT Initialize([in]  MPEG_REQUEST_TYPE         requestType,
  237.                            [in]  IMpeg2Data *              pMpeg2Data,
  238.                            [in]  PMPEG_CONTEXT             pContext,
  239.                            [in]  PID                       pid,
  240.                            [in]  TID                       tid,
  241.                            [in]  PMPEG2_FILTER             pFilter,           // OPTIONAL
  242.                            [in]  HANDLE                    hDataReadyEvent);
  243.  
  244.         HRESULT SupplyDataBuffer([in]  PMPEG_STREAM_BUFFER pStreamBuffer);
  245.     };
  246.  
  247.  
  248.  
  249.     ////////////////////////////////////
  250.     //
  251.     // SectionList CoClass
  252.     //
  253.     ////////////////////////////////////
  254.  
  255.     [
  256.         uuid(73DA5D04-4347-45d3-A9DC-FAE9DDBE558D)
  257.     ]
  258.     coclass SectionList
  259.     {
  260.         [default] interface ISectionList;
  261.     };
  262.  
  263.     
  264.  
  265.     ////////////////////////////////////
  266.     //
  267.     // Mpeg2Stream CoClass
  268.     //
  269.     ////////////////////////////////////
  270.  
  271.     [
  272.         uuid(F91D96C7-8509-4d0b-AB26-A0DD10904BB7)
  273.     ]
  274.     coclass Mpeg2Stream
  275.     {
  276.         [default] interface IMpeg2Stream;
  277.     };
  278.  
  279.     
  280.  
  281.     ////////////////////////////////////
  282.     //
  283.     // Mpeg2Data CoClass
  284.     //
  285.     ////////////////////////////////////
  286.  
  287.     [
  288.         uuid(C666E115-BB62-4027-A113-82D643FE2D99)
  289.     ]
  290.     coclass Mpeg2Data
  291.     {
  292.         [default] interface IMpeg2Data;
  293. #ifdef MPEG2_FUTURE_CODE // Not available in DX9
  294.         interface IAtscPsipParser;
  295.         interface IDvbSiParser;
  296. #endif
  297.     };
  298. };
  299.  
  300.  
  301.  
  302.     // Return to default packing
  303. #pragma pack(pop)
  304.